#pragma once

#include "../umlmodel_global.h"

#include "InteractionFragment.h"
#include "NamedElement.h"

namespace uml {

/// <summary>
/// Continuation
/// A Continuation is a syntactic way to define continuations of different branches
/// of an alternative CombinedFragment. Continuations are intuitively similar to
/// labels representing intermediate points in a flow of control.
/// </summary>
class UMLMODEL_EXPORT Continuation : public NamedElement, public InteractionFragment {

public: // Constructors and destructors
    explicit Continuation(const QString& umlType="uml::Continuation");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// setting getter
    /// True: when the Continuation is at the end of the enclosing InteractionFragment
    /// and False when it is in the beginning.
    /// </summary>
    bool setting() const;

    /// <summary>
    /// setting setter
    /// True: when the Continuation is at the end of the enclosing InteractionFragment
    /// and False when it is in the beginning.
    /// </summary>
    void setSetting(bool value);

private: // Fields
    /// <summary>
    /// setting
    /// True: when the Continuation is at the end of the enclosing InteractionFragment
    /// and False when it is in the beginning.
    /// </summary>
    const static bool setting_default_;
    bool setting_= setting_default_;

};

} // namespace uml
